home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d3
/
rettig.arc
/
TRSOURCE.EXE
/
_TR_REG.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-10-22
|
1KB
|
63 lines
/*********
*
* _TR_REG.C
*
* by Ralph Davis
*
* Placed in the public domain by Tom Rettig Associates, 10/22/1990.
*
*********/
#include "trlib.h"
_tr_reg(regname)
char *regname;
{
regname = _tr_toup(regname);
if (_tr_strcmp(regname, "AX") == 0)
return( REG_AX );
else if (_tr_strcmp(regname, "BX") == 0)
return( REG_BX );
else if (_tr_strcmp(regname, "CX") == 0)
return( REG_CX );
else if (_tr_strcmp(regname, "DX") == 0)
return( REG_DX );
else if (_tr_strcmp(regname, "SP") == 0)
return( REG_SP );
else if (_tr_strcmp(regname, "BP") == 0)
return( REG_BP);
else if (_tr_strcmp(regname, "SI") == 0)
return( REG_SI);
else if (_tr_strcmp(regname, "DI") == 0)
return( REG_DI);
else if (_tr_strcmp(regname, "DS") == 0)
return( REG_DS);
else if (_tr_strcmp(regname, "ES") == 0)
return( REG_ES);
else if (_tr_strcmp(regname, "SS") == 0)
return( REG_SS);
else if (_tr_strcmp(regname, "CS") == 0)
return( REG_CS);
else if (_tr_strcmp(regname, "IP") == 0)
return( REG_IP);
else if (_tr_strcmp(regname, "FF") == 0)
return( REG_FF);
else
return( 99 ); /* Error signal */
}